package tech.yixiyun.framework.kuafu.view;

/**
 * 响应输出普通文本
 */
public class TextView extends View {
    private String content;

    public TextView() {
    }
    public TextView(String content) {
        this.content = content;
    }
    @Override
    public void render() {
        try {
            getResponse().setHeader("content-type", "text/html; charset=utf-8");
            this.getResponse().getWriter().write(content);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
}
